package com.oss.controller;

import com.oss.core.OssClient;
import com.oss.core.OssFileRequest;
import com.oss.core.OssFileResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 王霄
 * @date 2022/9/28 15:46
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/oss")
public class OssController {
    private final OssClient ossClient;

    @GetMapping("/uploadFile")
    public OssFileResponse uploadFile(OssFileRequest ossFileRequest) {
        return ossClient.uploadFile(ossFileRequest);
    }
}
